//1.
//克隆接口
public class Person implements Cloneable{//必须实现克隆接口，标记它能被克隆
    public String name;

    public Person(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                '}';
    }

    //重写克隆函数

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
